<template>
  <div class="app-container">
    <el-table :data="replyList">
      <!-- <el-table-column type="selection" width="55" align="center" /> -->
      <el-table-column label="设备SN码" align="center" prop="equipmentSn" />
      <el-table-column label="设备型号" align="center" prop="equipmentModel" />

      <el-table-column label="绑定时间" align="center" prop="createTime" width="180">
      </el-table-column>
  <!--    <el-table-column label="解绑时间" align="center" prop="unboundTime" width="180">
      </el-table-column> -->
    </el-table>

    <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
  </div>
</template>

<script>
  export default {
    name: "DeviceList",
    props: ['deviceList'],
    data() {
      return {
        // 总条数
        total: 0,
        // 【请填写功能名称】表格数据
        replyList: [],
        // 查询参数
        queryParams: {
          pageNum: 1,
          pageSize: 10,

        },
      };
    },
    watch:{
      deviceList(newVal){
       this.getList();
      }
    },
    created() {
      this.getList();
    },
    methods: {
      /** 查询【请填写功能名称】列表 */
      getList() {
        this.replyList = this.deviceList
        this.total = this.deviceList.length;
        // this.loading = true;
        // listReply(this.queryParams).then(response => {
        //   this.replyList = response.rows;
        //   this.total = response.total;
        //   this.loading = false;
        // });
      },
    }
  }
</script>
